<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>购物车</title>
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/base.css" />
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/shop_cart.css" />
	<script type="text/javascript">
		var APP = '<?php echo "__APP__" ;?>';
	</script>
	<script type="text/javascript" src="__PUBLIC__/js/jquery-1.11.0.min.js"></script>
	<script type="text/javascript" src="__PUBLIC__/js/head.js"></script>
	<script type="text/javascript" src="__PUBLIC__/js/menu.js"></script>
	<script type="text/javascript" src="__PUBLIC__/js/common.js"></script>
	<script type="text/javascript" src="__PUBLIC__/js/cart1.js"></script>
	<!-- 为了保证IE载入以下文件 -->
	<script type="text/javascript" src="__PUBLIC__/Css/es5-shim/es5-sham.min.js"></script>
	<script type="text/javascript" src="__PUBLIC__/Css/es5-shim/es5-shim.min.js"></script>
	<!-- 载入less.js -->
	<script type="text/javascript" src="__PUBLIC__/Css/es5-shim/less-1.5.0.min.js"></script>
	
</head>
<body>
<load file="__PUBLIC__/head.html"/>
<!-- 主体部分开始 -->
<p class="zhishao">最少 1 件起售</p>
<div class="shop-cart-con">
	<div class="che-l">
		<i></i>
		<div class="che-l-r">
			<h3>我的购物车</h3>
			<div class="percent">
				<span class="bg"><span class="up" style="width:{$per}%"></span></span>
				<span class="num" style="margin-left:10px;">{$cart|count}/20</span>
			</div>
		</div>
		
	</div>
	<div class="che-r"><img src="__PUBLIC__/images/step1.jpg" alt="" /></div>
	<div class="clear"></div>
	<!-- 如果购物车是空的显示块开始 -->
<if value="is_null($cart) or empty($cart)">
<div class="shop-nothing">
	<i></i>
	<p><strong>您的购物车还是空的，赶紧行动吧！您可以：</strong><br />去<a href="__ROOT__">首页</a>团购喜欢的产品</p>
</div>

<!-- 如果购物车是空的显示块结束-->
<else>
<!-- 如果购物车有商品 开始 -->
<form action="{|U:'Cart/cart2'}" method="post">
<table border="0" width="100%" cellspacing="0" class="shop-list">
	<tr bgcolor="#f7f7f7" style="font-size:14px; border-bottom:1px solid #ddd; height:40px;">
		<th width="100"><input type="checkbox" name="all" checked="checked" /> <label for="all">全选</label></th>
		<th width="300">项目</th>
		<th width="120" align="center">状态</th>
		<th width="120" align="center">单价</th>
		<th width="170" align="center">类型/数量</th>
		<th width="" align="center">小计</th>
	</tr>
	<foreach from="$cart" value="$v">
	<tr height="60" class="listtr">
		<td align="center"><input type="checkbox" name="gid[]" checked="checked" value="{$v.gid}" /></td>
		<td>
			<div class="item">
				<div class="tu"><a href="{|U:'Article/index',array('gid'=>$v['gid'])}" target="_blank"><img src="__ROOT__/{$v.pic}" width="75" height="45" alt="" /></a></div>
				<div class="info"><p><a href="{|U:'Article/index',array('gid'=>$v['gid'])}" target="_blank">{$v.title}</a></p></div><input type="hidden" name="title_{$v.gid}" value="{$v.title}" />
			</div>
		</td>
		<td align="center">可购买</td>
		<td align="center">¥<span class="group_price">{$v.group_price}</span><input type="hidden" name="group_price_{$v['gid']}" value="{$v.group_price}" /></td>
		<td><p class="num"><a class="subtract" href="javascript:">－</a><input class="num-text" type="text" value="{$v.num}" name="num_{$v.gid}" /><a class="plus" href="javascript:">＋</a></p>
		</td>
		<td align="center" class="xiaoji">¥<span>37.10</span></td>
	</tr>
	</foreach>
	<tr height="50">
		<td colspan="6">
			<div class="total">已选<span class="jian">{$cart|count}</span>件商品 应付总额： <span class="zong">¥37.10</span> </div>
		</td>
	</tr>
</table>
<div class="sub-order"><input type="submit" value="提交订单" /></div>
</form>
</if>
<!-- 如果购物车有东西 结束 -->
</div>


<!-- 主体部分结束 -->
<!-- 底部开始 -->
<load file="__PUBLIC__/footer.html"/>
<!-- 底部结束 -->
</body>
</html>